# _*_ coding: utf-8 _*_

"""
Hello World GUI
"""

import wx


class HelloFrame(wx.Frame):

    def __init__(self, *args, **kw):

        super(HelloFrame, self).__init__(*args, **kw)


        pnl = wx.Panel(self)


        st = wx.StaticText(parent=pnl, label="Hello World!", pos=(25, 25))
        font = st.GetFont()
        font.PointSize += 10
        font = font.Bold()
        st.SetFont(font)

        self.make_menubar()

        self.CreateStatusBar()
        self.SetStatusText("Welcome to wxPython!")

    def make_menubar(self):

        menu_file = wx.Menu()


        item_hello = menu_file.Append(-1, "&Hello...\tCtrl-H", "Help string shown in status bar for this menu item")
        menu_file.AppendSeparator()


        item_exit = menu_file.Append(wx.ID_EXIT)


        menu_help = wx.Menu()
        item_about = menu_help.Append(wx.ID_ABOUT)


        menu_bar = wx.MenuBar()
        menu_bar.Append(menu_file, "&File")
        menu_bar.Append(menu_help, "&Help")


        self.SetMenuBar(menu_bar)


        self.Bind(wx.EVT_MENU, self.OnHello, item_hello)
        self.Bind(wx.EVT_MENU, self.OnExit, item_exit)
        self.Bind(wx.EVT_MENU, self.OnAbout, item_about)

    def OnExit(self, event):

        self.Close(True)

    def OnHello(self, event):

        wx.MessageBox("Hello again from wxPython")

    def OnAbout(self, event):

        wx.MessageBox("This is a wxPython Hello World sample", "About Hello World 2", wx.OK | wx.ICON_INFORMATION)


if __name__ == '__main__':
    app = wx.App()
    frm = HelloFrame(None, title='Hello World 2')
    frm.Show()
    app.MainLoop()